﻿using System.Collections;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfApp45
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void btnA_Click(object sender, RoutedEventArgs e)
        {
            Button? dpo = LogicalTreeHelper.FindLogicalNode(this, "btnA") as Button;
            IEnumerable list = LogicalTreeHelper.GetChildren(this);
            StackPanel? sp = LogicalTreeHelper.GetParent(btnA) as StackPanel;

            var obj1 = LogicalTreeHelper.FindLogicalNode(this, "btnA");
            var obj2 = LogicalTreeHelper.GetParent(btnA);
        }

        private void btnB_Click(object sender, RoutedEventArgs e)
        {

        }
    }
}